<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">

<h:head>
	<title>Login</title>
	<link rel="stylesheet" type="text/css" href="./css/main.css" />
</h:head>

<h:body>
	<div class="centerPanel">
		<h4>Login</h4>

		<h:form>
			<h:panelGrid columns="1">
				<h:outputLabel value="name" for="name" />
				<h:inputText id="name" value="#{loginBean.name}" required="true"
					requiredMessage="login is required" />
				<h:message for="name" />

				<h:outputLabel value="password" for="password" />
				<h:inputSecret id="password" value="#{loginBean.password}"
					required="true" requiredMessage="password is required" />
				<h:message for="password" />

				<h:commandButton action="#{loginBean.login}" value="Login"
					styleClass="btn btn-primary" />

			</h:panelGrid>

			<h:panelGroup binding="#{loginBean.loginErrorPanel}" rendered="false">
				<p>User with such name and password does not exist</p>
			</h:panelGroup>
		</h:form>
	</div>

</h:body>

</html>